﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using Ue.Infrastructure.DomainBase;
using Ue.Qcdz.Domain.Permissions;
using Ue.Qcdz.Domain.TheResource;

namespace Ue.Qcdz.Domain.Roles
{
    public class Role:EntityBase
    {
        public Role(object key) : base(key)
        {
            
        }

        public Role(string name,object key)
            : base(key)
        {
            PermissionList=new List<Permission>();
            ResourceList=new List<Resource>();
            this.Name = name;
            
        }
        public List<Permission> PermissionList { get; set; }
        public List<Resource> ResourceList { get; set; }
        public string Id { get; private set; }
        public string Name { get;private set; }
        public void ModifyPermission(List<Permission> permissionList)
        {
            this.PermissionList = permissionList;
        }
        public void ModifyResource(List<Resource> resourceList)
        {
            this.ResourceList = resourceList;
        }

    }
}
